package com.xlu.Controller;


import com.xlu.dto.StuDTO;
import com.xlu.result.Result;
import com.xlu.serve.StudentServe;
import com.xlu.vo.StudentVo;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RequestMapping("/admin/student")
@RestController
@Slf4j
@Api("学生相关")
public class Student {

    @Autowired
    private StudentServe studentServe;
    @GetMapping("/list")
    public Result getList(){
        log.info("ok");
        return Result.success();
    }
    @GetMapping("/PageList")
    public Result getPageList(StuDTO studto){
        log.info("数据{}",studto);

        List<StudentVo> studentVoList = studentServe.list(studto);
        return Result.success(studentVoList);
    }
}
